﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;


using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using MauiApp1.Services;
using MauiApp1.View;
using Microsoft.Maui;
using Microsoft.Maui.Controls;

namespace MauiApp1.ViewModel
{
     public partial class MainPageViewModel :ObservableObject
    {

        private readonly ITest _test;
        public MainPageViewModel(ITest test)
        {
            _test = test;
        }
        //public MainPageViewModel(ITest)
        // {

        // }

        private ICommand clikdCommand { get; set; }

        public ICommand ClikCommand
        {
            get {
                
                if (clikdCommand == null) { clikdCommand = new Command(BtnTest); }
                return clikdCommand;
            
            } 
        }

        [RelayCommand]
        public void BtnTest()
        {

            _test.GetString();


        }

    }
}
